package com.imooc.ecommerce.feign;

import com.imooc.ecommerce.account.AddressInfo;
import com.imooc.ecommerce.common.TableId;
import com.imooc.ecommerce.feign.hystrix.AddressClientHystrix;
import com.imooc.ecommerce.vo.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 用户账户服务 Feign接口
 * @author zhangshao
 * @since 2023/12/13 23:43
 */
@FeignClient(contextId = "AddressClient",value = "e-commerce-account-service",fallback = AddressClientHystrix.class)
public interface AddressClient {

    /**
     * 根据id查询地址信息
     *
     *
     **/
     @RequestMapping(value = "/ecommerce-account-service/address/address-info-by-table-id",method = RequestMethod.POST)
    CommonResponse<AddressInfo> getAddressInfoByTableId(@RequestBody TableId tableId);
}
